<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
</head>
<!-- 数据存在 -->
<!-- 不是语句 if for -->
<!-- 不能在标签属性内写 -->
<body>
    <div id="app">
        <p>{{nikname}}</p>
        <p>{{nikname.toUpperCase()}}</p>
        <p>{{nikname+'你好'}}</p>
        <p>{{age>=18?'成年':'未成年'}}</p>
        <p>{{friend.name+friend.desc}}</p>
    </div>
</body>
<script>
   const app=new Vue({
    el:'#app',
    data:{
        nikname:'tony',
        age:19,
        friend:{
            name:'jespon',
            desc:'爱学习'
        }
    }
   })
</script>
</html>